<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
<%@ include file="/cms/include/init_admin.jsp" %>
<%@ page import="com.qbooks.cms.homepage.*" %>
<%

	HashList code009	= CommonUtil.getCodeList("009");	//권한


	String s_board_name		= StringUtil.toHan(request.getParameter("s_board_name"));


	HashMap infos = new HashMap();
	infos.put("board_name",	s_board_name);


	HomepageDAO dao 	= new HomepageDAO();

	HashList list 	= dao.selectBoardList(infos);



%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title><%= SYSTEM_NAME %></title>
	<%@ include file="/cms/include/cssnjs.jsp"  %>
	<script type="text/javascript">
	$(document).ready(function() {
		
	});

	function fnNew() {
		$('#board_id').val('XXXXXX');
		$('#searchForm').attr('action', './boardDetail.jsp?job_type=C');
		$('#searchForm').submit();
	}

	function fnWordDetail(board_id) {
		cfOpen('/board/wordList.jsp?board_id='+board_id, '게시판', 900, 600);
	}
	</script>
</head>
<body>
<div id="wrap">
	<div id="top">
		<%@ include file="/cms/include/top.jsp" %>
	</div>
	<div id="page">
		<div id="menu">
			<%@ include file="/cms/include/leftMenu.jsp" %>
		</div>
		<div id="contents">
			<div class="menu_title">
				<h1>게시판관리</h1>
				<p>CMS > 홈페이지 > <b>게시판관리</b></p>
			</div>
			<div class="clear line_01"></div>

			<form id="searchForm" method="post" action="./boardList.jsp">
			<input type="hidden" name="board_id" id="board_id" />

			<table cellpadding="0" cellspacing="0" class="table_01 mt15">
			<colgroup>
				<col width="100px" />
				<col  />
			</colgroup>
			<tr>
				<th><p>게시판명</p></th>
				<td class="brx">
					<input type="text" name="s_board_name" id="s_board_name" value="<%= s_board_name %>" class="w120"/>
				</td>
			</tr>
			</table>

			<div class="mt10 mb10 r">
				<input type="image" class="button" src="../images/btn_search.gif"/>
				<a href="#nohref" onclick="fnNew()"><img src="../images/btn_new.gif"/></a>
			</div>

			</form>

			<div class="search_result">검색결과 : <%= list.size() %>건</div>

		    <table cellpadding="0" cellspacing="0" class="table_03">
				<colgroup>
					<col width="100px"/>
					<col />
					<col width="100px"/>
					<col width="60px"/>
					<col width="60px"/>
					<col width="60px"/>
					<col width="60px"/>
					<col width="60px"/>
					<col width="60px"/>
					<col width="60px"/>
					<col width="60px"/>
					<col width="60px"/>
					<col width="160px"/>
				</colgroup>
				<thead>
					<tr>
						<th><p>아이디</p></th>
						<th><p>게시판명</p></th>
						<th><p>게시글수</p></th>
						<th><p>신규</p></th>
						<th><p>히트수</p></th>
						<th><p>에디터</p></th>
						<th><p>답글</p></th>
						<th><p>코멘트</p></th>
						<th><p>비밀글</p></th>
						<th><p>쓰기권한</p></th>
						<th><p>읽기권한</p></th>
						<th><p>사용여부</p></th>
						<th><p></p></th>
					</tr>
				</thead>
				<tbody id="list">
			<%	for (int i = 0; i < list.size(); i++) { %>
					<tr>
						<td><%= list.get("board_id", i) %></td>
						<td><%= list.get("board_name", i) %></td>
						<td><%= list.get("word_count", i) %></td>
						<td><%= list.get("new_period", i) %></td>
						<td><%= list.get("hit_count", i) %></td>
						<td><%= list.get("editor_yn", i) %></td>
						<td><%= list.get("reply_yn", i) %></td>
						<td><%= list.get("comment_yn", i) %></td>
						<td><%= list.get("secret_yn", i) %></td>
						<td><%= list.get("write_auth_name", i) %></td>
						<td><%= list.get("read_auth_name", i) %></td>
						<td><%= list.get("use_yn", i) %></td>
						<td>
							<a href="#nohref" onclick="fnWordDetail(<%= list.get("board_id", i) %>)">[글보기]</a>
							<a href="./boardDetail.jsp?board_id=<%= list.get("board_id", i) %>">[설정변경]</a>
						</td>
					</tr>
			<%	} %>
				</tbody>
			</table>

			<div class="paging">

			</div>
		</div>
	</div>
</div>
</body>
</html>
